import { 
	//创建路由的api
	createRouter, 
	// 创建路由的运行模式
	// createWebHistory 
	createWebHashHistory
	} from 'vue-router'



const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }
	{
			path:'/',
			redirect:'/login'
	},
	{
		name:'login',
		path:'/login',
		component:() =>import('@/views/login/index.vue')
	},
	{
		name:'menu',
		path:'/menu',
		component:() =>import('@/views/menu/index.vue'),
		children:[
			{
				name:'home',
				path:'/home',
				component:() =>import('@/views/home/index.vue')
			}
		]
	},
	
  ]
})

export default router
